package com.lab.cloud.common.converter.mvc;

import com.lab.cloud.common.converter.UniversalEnumConverterFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
@Slf4j
public class CommonWebAppConfigurer extends WebMvcConfigurerAdapter {
	@Override
	public void addFormatters(FormatterRegistry registry) {
		log.info("=========Into CommonWebAppConfigurer=========");
		registry.addConverterFactory(new UniversalEnumConverterFactory());
	}
}